if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].sp_DonViQuiDoi_Update') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].sp_DonViQuiDoi_Update
GO
CREATE PROC sp_DonViQuiDoi_Update
	@ID						int,
	@Don_vi_goc					nvarchar(50),
	@So_luong				float,
	@Child_id				int,
	@Ghi_chu				nvarchar(100)

AS
BEGIN
	DECLARE @Ngay_cap_nhat_cuoi datetime
	SET @Ngay_cap_nhat_cuoi = getdate()
	UPDATE DonViQuiDoi
		SET			Don_vi_goc=@Don_vi_goc,
					So_luong=@So_luong,
					Child_id=@Child_id,
					Ghi_chu =@Ghi_chu,
					Ngay_cap_nhat_cuoi=@Ngay_cap_nhat_cuoi
		WHERE ID=@ID
END
